<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-3 col-sm-2"><span style="color: red">*</span>&nbsp;{:__('订单编号')}:</label>

        <div class="col-xs-3 col-sm-2">
            <input id="c-purchase_sn" data-rule="required" class="form-control" name="row[purchase_sn]" type="text" value="{$row.purchase_sn|htmlentities}" disabled>

        </div>
        <label class="control-label col-xs-3 col-sm-2">{:__('Bin_type')}:</label>
        <div class="col-xs-3 col-sm-2">
            <input id="c-bin_type" data-field="name"  data-order-by="weigh desc" data-source="bin.type/index" class="form-control selectpage" name="row[bin_type]" type="text" value="{$row.bin_type|htmlentities}" disabled>
        </div>

        <label class="control-label col-xs-3 col-sm-1">{:__('Bin_native')}:</label>
        <div class="col-xs-3 col-sm-1">
            <input id="c-bin_native"  data-field="name" data-order-by="weigh desc" data-source="bin.native/index" class="form-control selectpage" name="row[bin_native]" type="text" value="{$row.bin_native|htmlentities}" disabled>

        </div>



    </div>
    <div class="form-group">
        <label class="control-label col-xs-3 col-sm-2">{:__('Take_number')}:</label>
        <div class="col-xs-3 col-sm-2">
            <input id="c-take_number"  class="form-control" name="row[take_number]" type="text" value="{$row.take_number|htmlentities}" disabled>
        </div>


        <label class="control-label col-xs-3 col-sm-2"><span style="color: red">*</span>&nbsp;{:__('Yard_id')}:</label>
        <div class="col-xs-3 col-sm-2">
            <input id="c-yard_id" data-rule="required" data-params='{"custom[organ_type]":1}' data-field="organ_name" data-source="organization/index" class="form-control selectpage" name="row[yard_id]" type="text" value="{$row.yard_id|htmlentities}" disabled>
        </div>


        <label class="control-label col-xs-3 col-sm-1"><span style="color: red">*</span>&nbsp;{:__('Purchase_number')}:</label>
        <div class="col-xs-3 col-sm-1">
            <input id="c-purchase_number" data-rule="required" class="form-control" name="row[purchase_number]" type="number" value="{$row.purchase_number|htmlentities}" disabled>
        </div>


    </div>
    <div class="form-group">
        <label class="control-label col-xs-3 col-sm-2">{:__('完成数量')}:</label>
        <div class="col-xs-3 col-sm-2">
            <input id="c-complete_number"  class="form-control" name="row[complete_number]" type="text" value="{$row.complete_number|htmlentities}" disabled>
        </div>


        <label class="control-label col-xs-3 col-sm-2"><span style="color: red">*</span>&nbsp;{:__('Salesman_id')}:</label>
        <div class="col-xs-3 col-sm-2">
            <input id="c-salesman_id" data-rule="required" data-field="nickname"  data-source="auth.admin/index" class="form-control selectpage" name="row[salesman_id]" type="text" value="{$row.salesman_id|htmlentities}" disabled>
        </div>





    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-4" style="color:red"> 还可以添加{$row.remain_number|htmlentities}个箱子</label>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">箱子详情</label>
        <div class="col-xs-12 col-sm-8">

            <table class="table fieldlist" data-name="row[multiplejson]" data-template="row[multiplejson]tpl">
                <tr>
                    <td><span style="color: red">*</span>&nbsp;箱号</td>
                    <td><span style="color: red">*</span>&nbsp;箱型</td>
                    <td><span style="color: red">*</span>&nbsp;箱况</td>
                    <td><span style="color: red">*</span>&nbsp;存放堆场</td>
                    <td><span style="color: red">*</span>&nbsp;提箱单号</td>
                    <td><span style="color: red">*</span>进场日期</td>
                    <td>新增箱子备注</td>
                    <td width="90">{:__('Operate')}</td>
                </tr>
                <tr><td colspan="5">
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append hide"><i class="fa fa-plus"></i> {:__('Append:')}</a>
                    <a href="javascript:;" id="btn-tianjia" class="btn btn-sm btn-success btn-tianjia"><i class="fa fa-plus"></i> {:__('添加')}</a>
                    <textarea  class="form-control hide" cols="30" rows="5"></textarea>
                </td></tr>
            </table>
            <script type="text/html" id="row[multiplejson]tpl">
                <tr>
                    <td><input type="text" data-rule="required" name="<%=name%>[<%=index%>][bin_sn]" class="form-control"  placeholder="必填"/></td>

                    <td>
                        <select  data-rule="required" class="form-control selectpicker bin_type" name="<%=name%>[<%=index%>][bin_type]" >
                            <option ></option>
                            {foreach name="binTypeList" item="vo"}
                            <option value="{$vo.id}" {in name="$vo.id" value=""}selected{/in}>{$vo.name}</option>
                            {/foreach}
                        </select>
                    </td>
                    <td>
                        <select  data-rule="required" class="form-control selectpicker bin_native" name="<%=name%>[<%=index%>][bin_native]">
                            <option ></option>
                            {foreach name="binNativeList" item="vo"}
                            <option value="{$vo.id}" {in name="$vo.id" value=""}selected{/in}>{$vo.name}</option>
                            {/foreach}
                        </select>
                    </td>
                    <td>
                        <select  data-rule="required" class="form-control selectpicker yard_id" name="<%=name%>[<%=index%>][yard_id]" >
                            <option ></option>
                            {foreach name="yardList" item="vo"}
                            <option value="{$vo.id}" >{$vo.organ_name}</option>
                            {/foreach}
                        </select>
                    </td>
                    <td>
                        <input  data-rule="required" type="text" name="<%=name%>[<%=index%>][take_number]" class="form-control take_number"  placeholder="必填" />
                    </td>
                    <td><input data-rule="required" type="text" name="<%=name%>[<%=index%>][entertime]" class="form-control datetimepicker entertime" value="{:date('Y-m-d H:i:s')}"  /></td>

                    <td><input type="text" name="<%=name%>[<%=index%>][bin_remark]" class="form-control"  placeholder="选填" /></td>

                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>

        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
